package com.xiguaji.boot.mapper;

import lombok.Data;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Data
public class MapperTarget {
    private long id;
    private String targetName;
    private String sourceName;
    private String now;

    @Mapper(componentModel = "spring")
    public interface MapperTargetMapper {
        @Mapping(source = "source.name", target = "sourceName")
        MapperTarget map(MapperSource s);

        List<MapperTarget> map(List<MapperSource> sourceList);
    }
}
